from pathlib import Path
import mystep1v3

print("Testing image validation...")

# Test with a known image path
test_path = Path("D:/abc/images/train")
if test_path.exists():
    image_files = list(test_path.glob("*.jpg"))
    if image_files:
        test_image = image_files[0]
        print(f"Testing: {test_image}")
        
        # Test our validation function
        is_valid = mystep1v3.is_valid_image_file(test_image)
        print(f"Validation result: {is_valid}")
        
        # Test with a few more images
        for i, img_file in enumerate(image_files[:5]):
            is_valid = mystep1v3.is_valid_image_file(img_file)
            print(f"  {img_file.name}: {'Valid' if is_valid else 'Invalid'}")
    else:
        print("No jpg files found")
else:
    print("Test path does not exist") 